package zhoufu.sz.sanxiao_check.inject.modules;

import android.app.Activity;

import com.google.gson.Gson;

import dagger.Module;
import dagger.Provides;
import zhoufu.sz.sanxiao_check.inject.PerActivity;
import zhoufu.sz.sanxiao_check.inject.bindadapters.BuildBasicAdapter;
import zhoufu.sz.sanxiao_check.net.BasicRequestRepository;
import zhoufu.sz.sanxiao_check.net.ModifyActionRepository;
import zhoufu.sz.sanxiao_check.net.RefreshRepository;

/**
 * Created by h on 2016/6/19.
 */
@Module
public class PresenterModule {

    @Provides
    @PerActivity
    public BuildBasicAdapter provideBuildBasicAdapter() {
        return new BuildBasicAdapter();
    }

    @Provides
    @PerActivity
    public BasicRequestRepository provideBasicRequestRepository(Activity activity, Gson gson) {
        return new BasicRequestRepository(activity, gson);
    }

    @Provides
    @PerActivity
    public RefreshRepository provideRefreshRepository(Activity activity, Gson gson) {
        return new RefreshRepository(activity, gson);
    }

    @Provides
    @PerActivity
    public ModifyActionRepository provideModifyActionRepository(Activity activity,Gson gson){
        return new ModifyActionRepository(activity,gson);
    }
}
